// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env: "hlssb-9gxncncnf24cacc5"
})

const db = cloud.database();
// 云函数入口函数
exports.main = async (event, context) => {
  let userInfo = event.userInfo;
  try {
    return await db.collection("user").where({
      userInfo: userInfo
    }).get({
      success(res){
        console.log(res);
      }
    });
  } catch (error) {

  }

}